Data placement technique for striping data containers across volumes of a storage system cluster

ABSTRACT

A technique places content, such as data, of one or more data containers on volumes of a striped volume set (SVS). The placement of data across the volumes of the SVS allows specification of a deterministic pattern of fixed length. That is, the pattern determines a placement of data of a data container that is striped among the volumes of the SVS. The placement pattern is such that the stripes are distributed exactly or nearly equally among the volumes and that, within any local span of a small multiple of the number of volumes, the stripes are distributed nearly equally among the volumes. The placement pattern is also substantially similar for a plurality of SVSs having different numbers of volumes.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. Ser. No. 11/118,298, issuedas U.S. Pat. No. 7,366,837 on Apr. 29, 2008, filed by Peter F. Corbettet al. on Apr. 29, 2005, which is a Continuation-in-Part of U.S. patentapplication Ser. No. 10/720,364, filed Nov. 24, 2003 now issued as U.S.Pat. No. 7,185,144 and entitled SEMI-STATIC DISTRIBUTION TECHNIQUE, byPeter F. Corbett et al, the contents of which is hereby incorporated byreference.

The present application is also related to U.S. patent application Ser.Nos. 11/119,118, entitled SYSTEM AND METHOD FOR RESTRIPING DATA ACROSS APLURALITY OF VOLUMES, by Richard Jernigan, Patent Publication No.2006/0248379, and 11/119,278, entitled STORAGE SYSTEM ARCHITECTURE FORSTRIPING DATA CONTAINER CONTENT ACROSS VOLUMES OF A CLUSTER, by RichardJernigan et al., Patent Publication No. 2005/0192932, the contents ofwhich are hereby incorporated by reference.

FIELD OF THE INVENTION

The present invention relates to storage systems and, more specifically,to the placement of data across a plurality of volumes in a storagesystem.

BACKGROUND OF THE INVENTION

A storage system typically comprises one or more storage devices intowhich information may be entered, and from which information may beobtained, as desired. The storage system includes a storage operatingsystem that functionally organizes the system by, inter alia, invokingstorage operations in support of a storage service implemented by thesystem. The storage system may be implemented in accordance with avariety of storage architectures including, but not limited to, anetwork-attached storage environment, a storage area network and a diskassembly directly attached to a client or host computer. The storagedevices are typically disk drives organized as a disk array, wherein theterm “disk” commonly describes a self-contained rotating magnetic mediastorage device. The term disk in this context is synonymous with harddisk drive (HDD) or direct access storage device (DASD).

The storage operating system of the storage system may implement ahigh-level module, such as a file system, to logically organize theinformation stored on volumes as a hierarchical structure of datacontainers, such as files and logical unit numbers (luns). For example,each “on-disk” file may be implemented as set of data structures, i.e.,disk blocks, configured to store information, such as the actual datafor the file. These data blocks are organized within a volume blocknumber (vbn) space that is maintained by the file system. The filesystem may also assign each data block in the file a corresponding “fileoffset” or file block number (fbn). The file system typically assignssequences of fbns on a per-file basis, whereas vbns are assigned over alarger volume address space. The file system organizes the data blockswithin the vbn space as a “logical volume”; each logical volume may be,although is not necessarily, associated with its own file system.

A known type of file system is a write-anywhere file system that doesnot overwrite data on disks. If a data block is retrieved (read) fromdisk into a memory of the storage system and “dirtied” (i.e., updated ormodified) with new data, the data block is thereafter stored (written)to a new location on disk to optimize write performance. Awrite-anywhere file system may initially assume an optimal layout suchthat the data is substantially contiguously arranged on disks. Theoptimal disk layout results in efficient access operations, particularlyfor sequential read operations, directed to the disks. An example of awrite-anywhere file system that is configured to operate on a storagesystem is the Write Anywhere File Layout (WAFL™) file system availablefrom Network Appliance, Inc., Sunnyvale, Calif.

The storage system may be further configured to operate according to aclient/server model of information delivery to thereby allow manyclients to access data containers stored on the system. In this model,the client may comprise an application, such as a database application,executing on a computer that “connects” to the storage system over acomputer network, such as a point-to-point link, shared local areanetwork (LAN), wide area network (WAN), or virtual private network (VPN)implemented over a public network such as the Internet. Each client mayrequest the services of the storage system by issuing file-based andblock-based protocol messages (in the form of packets) to the systemover the network.

A plurality of storage systems may be interconnected to provide astorage system environment configured to service many clients. Eachstorage system may be configured to service one or more volumes, whereineach volume stores one or more data containers. Yet often a large numberof data access requests issued by the clients may be directed to a smallnumber of data containers serviced by a particular storage system of theenvironment. A solution to such a problem is to distribute the volumesserviced by the particular storage system among all of the storagesystems of the environment. This, in turn, distributes the data accessrequests, along with the processing resources needed to service suchrequests, among all of the storage systems, thereby reducing theindividual processing load on each storage system. However, a noteddisadvantage arises when only a single data container, such as a file,is heavily accessed by clients of the storage system environment. As aresult, the storage system attempting to service the requests directedto that data container may exceed its processing resources and becomeoverburdened, with a concomitant degradation of speed and performance.

One technique for overcoming the disadvantages of having a single datacontainer, such as a file, that is heavily utilized is to stripe thedata container across a plurality of volumes configured as a stripedvolume set (SVS), where each volume is serviced by a different storagesystem, thereby distributing the load for the single data containeramong a plurality of storage systems. An example of such a datacontainer striping technique is described in the above referenced U.S.Patent Publication No. 2005/0192932, entitled STORAGE SYSTEMARCHITECTURE FOR STRIPING DATA CONTAINER CONTENT ACROSS VOLUMES OF ACLUSTER. Here, stripes of content (data) of a data container areallocated in round-robin order to each volume of the SVS in sequence,wrapping around to a first volume when a last volume of the SVS isreached. This data container striping technique achieves exact ornear-exact balance of data across the volumes of the SVS.

However, a noted disadvantage of such a data container stripingtechnique arises when the number of volumes within a SVS changes. Forexample, if a new volume is added to or an existing volume is removedfrom the SVS, nearly all the stripes will have to move to a differentvolume to restore balance, e.g., via a re-striping operation, among allthe volumes. Addition or removal of a volume from a SVS configured toimplement round-robin striping is an input/output (I/O) intensive andtime consuming operation that is expensive in terms of performance andduration of the re-striping operation. Yet restriping is an importantfeature, as it allows users and administrators to adjust the allocationof storage and processor resources to data containers by adding orremoving storage systems, or storage units, from a pool of storagesystems or units used for the data containers.

SUMMARY OF THE INVENTION

The present invention overcomes the disadvantages of the prior art byproviding a technique for placing content, such as data, of one or moredata containers on volumes of a striped volume set (SVS). The SVS isassociated with a set of striping rules that define a stripe algorithm,a stripe width and an ordered list of volumes distributed across aplurality of nodes interconnected as a cluster. The stripe algorithmspecifies the manner in which the data is apportioned as stripes acrossthe volumes, while the stripe width specifies the size/width of eachstripe. Notably, the data placement technique selects a volume withinwhich to place a stripe such that all stripes are apportioned among thevolumes of the SVS in a manner that improves the efficiency of storageservice provided by the cluster.

According to a first aspect of the invention, the placement of dataacross the volumes of the SVS allows specification of a deterministicpattern of fixed length. That is, the pattern determines a placement ofdata of a data container, such as a file, that is striped among thevolumes of the SVS. The placement pattern is such that the stripes aredistributed exactly or nearly equally among the volumes and that, withinany local span of a small multiple of the number of volumes, the stripesare distributed nearly equally among the volumes.

According to a second aspect of the invention, the placement pattern issubstantially similar for a plurality of SVSs having different numbersof volumes. For example, assume one or more volumes are added toexisting volumes of a SVS and that stripes on the existing volumes areredistributed among the additional volumes. This aspect of the inventionenables re-striping of the data by moving a minimum number of stripes,while retaining a property of balance across the new number of volumesin the SVS. In general, adding an Nth volume to a SVS having N−1 volumesrequires moving 1/N of the existing stripes from each of thepre-existing N−1 volumes to the added Nth volume.

Advantageously, the data placement technique minimizes the number ofstripes that have to move for any change in the number of volumes of theSVS, while retaining a property that the data is balanced or nearlybalanced across those volumes. The novel technique also minimizes thecost of a re-striping operation, while potentially substantiallyreducing the duration of such an operation. Moreover, the novel dataplacement technique maintains data balance after re-striping.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and further advantages of invention may be better understoodby referring to the following description in conjunction with theaccompanying drawings in which like reference numerals indicateidentical or functionally similar elements:

FIG. 1 is a schematic block diagram of a plurality of nodesinterconnected as a cluster in accordance with an embodiment of thepresent invention;

FIG. 2 is a schematic block diagram of a node in accordance with anembodiment of the present invention;

FIG. 3 is a schematic block diagram of a storage operating system thatmay be advantageously used with the present invention;

FIG. 4 is a schematic block diagram illustrating the format of a clusterfabric message in accordance with an embodiment of with the presentinvention;

FIG. 5 is a schematic block diagram illustrating the format of a datacontainer handle in accordance with an embodiment of the presentinvention;

FIG. 6 is a schematic block diagram of an exemplary inode in accordancewith an embodiment of the present invention;

FIG. 7 is a schematic block diagram of an exemplary buffer tree inaccordance with an embodiment of the present invention;

FIG. 8 is a schematic block diagram of an illustrative embodiment of abuffer tree of a file that may be advantageously used with the presentinvention;

FIG. 9 is a schematic block diagram of an exemplary aggregate inaccordance with an embodiment of the present invention;

FIG. 10 is a schematic block diagram of an exemplary on-disk layout ofthe aggregate in accordance with an embodiment of the present invention;

FIG. 11 is a schematic block diagram illustrating a collection ofmanagement processes in accordance with an embodiment of the presentinvention;

FIG. 12 is a schematic block diagram of a volume location database(VLDB) volume entry in accordance with an embodiment of the presentinvention;

FIG. 13 is a schematic block diagram of a VLDB aggregate entry inaccordance with an embodiment of the present invention;

FIG. 14 is a schematic block diagram of a VLDB striped volume set (SVS)entry in accordance with an embodiment the present invention;

FIG. 15A is a schematic diagram illustrating placement of stripes ofdata of a data container across volumes of an exemplary SVS according toa data placement technique of the present invention;

FIG. 15B is a schematic diagram illustrating reassignment of stripes ofdata of the data container across volumes of the exemplary SVS of FIG.17A according to the data placement technique of the present invention;

FIG. 16 is a diagram of a stripe placement table illustrating a repeatinterval for various SVS volume sizes in accordance with the dataplacement technique; and

FIG. 17 is a flowchart illustrating a sequence of steps for distributingdata stripes of a file among volumes of a SVS in accordance with anillustrative embodiment of the data placement technique of the presentinvention.

DETAILED DESCRIPTION OF AN ILLUSTRATIVE EMBODIMENT A. ClusterEnvironment

FIG. 1 is a schematic block diagram of a plurality of nodes 200interconnected as a cluster 100 and configured to provide storageservice relating to the organization of information on storage devices.The nodes 200 comprise various functional components that cooperate toprovide a distributed storage system architecture of the cluster 100. Tothat end, each node 200 is generally organized as a network element(N-blade 310) and a disk element (D-blade 350). The N-blade 310 includesfunctionality that enables the node 200 to connect to clients 180 over acomputer network 140, while each D-blade 350 connects to one or morestorage devices, such as disks 130 of a disk array 120. The nodes 200are interconnected by a cluster switching fabric 150 which, in theillustrative embodiment, may be embodied as a Gigabit Ethernet switch.An exemplary distributed file system architecture is generally describedin U.S. Pat. No. 6,671,773 titled METHOD AND SYSTEM FOR RESPONDING TOFILE SYSTEM REQUESTS, by M. Kazar et al., issued Dec. 30, 2003.

The clients 180 may be general-purpose computers configured to interactwith the node 200 in accordance with a client/server model ofinformation delivery. That is, each client may request the services ofthe node, and the node may return the results of the services requestedby the client, by exchanging packets over the network 140. The clientmay issue packets including file-based access protocols, such as theCommon Internet File System (CIFS) protocol or Network File System (NFS)protocol, over the Transmission Control Protocol/Internet Protocol(TCP/IP) when accessing information in the form of files anddirectories. Alternatively, the client may issue packets includingblock-based access protocols, such as the Small Computer SystemsInterface (SCSI) protocol encapsulated over TCP (iSCSI) and SCSIencapsulated over Fibre Channel (FCP), when accessing information in theform of blocks.

B. Storage System Node

FIG. 2 is a schematic block diagram of a node 200 that is illustrativelyembodied as a storage system comprising a plurality of processors 222a,b, a memory 224, a network adapter 225, a cluster access adapter 226,a storage adapter 228 and local storage 230 interconnected by a systembus 223. The local storage 230 comprises one or more storage devices,such as disks, utilized by the node to locally store configurationinformation (e.g., in configuration table 235) provided by one or moremanagement processes that execute as user mode applications 1100 (seeFIG. 11). The cluster access adapter 226 comprises a plurality of portsadapted to couple the node 200 to other nodes of the cluster 100. In theillustrative embodiment, Ethernet is used as the clustering protocol andinterconnect media, although it will be apparent to those skilled in theart that other types of protocols and interconnects may be utilizedwithin the cluster architecture described herein. In alternateembodiments where the N-blades and D-blades are implemented on separatestorage systems or computers, the cluster access adapter 226 is utilizedby the N/D-blade for communicating with other N/D-blades in the cluster100.

Each node 200 is illustratively embodied as a dual processor storagesystem executing a storage operating system 300 that preferablyimplements a high-level module, such as a file system, to logicallyorganize the information as a hierarchical structure of named datacontainers, such as directories, files and special types of files calledvirtual disks (hereinafter generally “blocks”) on the disks. However, itwill be apparent to those of ordinary skill in the art that the node 200may alternatively comprise a single or more than two processor system.Illustratively, one processor 222 a executes the functions of theN-blade 310 on the node, while the other processor 222 b executes thefunctions of the D-blade 350.

The memory 224 illustratively comprises storage locations that areaddressable by the processors and adapters for storing software programcode and data structures associated with the present invention. Theprocessor and adapters may, in turn, comprise processing elements and/orlogic circuitry configured to execute the software code and manipulatethe data structures. The storage operating system 300, portions of whichis typically resident in memory and executed by the processing elements,functionally organizes the node 200 by, inter alia, invoking storageoperations in support of the storage service implemented by the node. Itwill be apparent to those skilled in the art that other processing andmemory means, including various computer readable media, may be used forstoring and executing program instructions pertaining to the inventiondescribed herein.

The network adapter 225 comprises a plurality of ports adapted to couplethe node 200 to one or more clients 180 over point-to-point links, widearea networks, virtual private networks implemented over a publicnetwork (Internet) or a shared local area network. The network adapter225 thus may comprise the mechanical, electrical and signaling circuitryneeded to connect the node to the network. Illustratively, the computernetwork 140 may be embodied as an Ethernet network or a Fibre Channel(FC) network. Each client 180 may communicate with the node over network140 by exchanging discrete frames or packets of data according topre-defined protocols, such as TCP/IP.

The storage adapter 228 cooperates with the storage operating system 300executing on the node 200 to access information requested by theclients. The information may be stored on any type of attached array ofwritable storage device media such as video tape, optical, DVD, magnetictape, bubble memory, electronic random access memory, micro-electromechanical and any other similar media adapted to store information,including data and parity information. However, as illustrativelydescribed herein, the information is preferably stored on the disks 130of array 120. The storage adapter comprises a plurality of ports havinginput/output (I/O) interface circuitry that couples to the disks over anI/O interconnect arrangement, such as a conventional high-performance,FC link topology.

Storage of information on each array 120 is preferably implemented asone or more storage “volumes” that comprise a collection of physicalstorage disks 130 cooperating to define an overall logical arrangementof volume block number (vbn) space on the volume(s). Each logical volumeis generally, although not necessarily, associated with its own filesystem. The disks within a logical volume/file system are typicallyorganized as one or more groups, wherein each group may be operated as aRedundant Array of Independent (or Inexpensive) Disks (RAID). Most RAIDimplementations, such as a RAID-4 level implementation, enhance thereliability/integrity of data storage through the redundant writing ofdata “stripes” across a given number of physical disks in the RAIDgroup, and the appropriate storing of parity information with respect tothe striped data. An illustrative example of a RAID implementation is aRAID-4 level implementation, although it should be understood that othertypes and levels of RAID implementations may be used in accordance withthe inventive principles described herein.

C. Storage Operating System

To facilitate access to the disks 130, the storage operating system 300implements a write-anywhere file system that cooperates with one or morevirtualization modules to “virtualize” the storage space provided bydisks 130. The file system logically organizes the information as ahierarchical structure of named directories and files on the disks. Each“on-disk” file may be implemented as set of disk blocks configured tostore information, such as data, whereas the directory may beimplemented as a specially formatted file in which names and links toother files and directories are stored. The virtualization module(s)allow the file system to further logically organize information as ahierarchical structure of blocks on the disks that are exported as namedlogical unit numbers (luns).

In the illustrative embodiment, the storage operating system ispreferably the NetApp® Data ONTAP™ operating system available fromNetwork Appliance, Inc., Sunnyvale, Calif. that implements a WriteAnywhere File Layout (WAFL™) file system. However, it is expresslycontemplated that any appropriate storage operating system may beenhanced for use in accordance with the inventive principles describedherein. As such, where the term “WAFL” is employed, it should be takenbroadly to refer to any storage operating system that is otherwiseadaptable to the teachings of this invention.

FIG. 3 is a schematic block diagram of the storage operating system 300that may be advantageously used with the present invention. The storageoperating system comprises a series of software layers organized to forman integrated network protocol stack or, more generally, amulti-protocol engine 325 that provides data paths for clients to accessinformation stored on the node using block and file access protocols.The multi-protocol engine includes a media access layer 312 of networkdrivers (e.g., gigabit Ethernet drivers) that interfaces to networkprotocol layers, such as the IP layer 314 and its supporting transportmechanisms, the TCP layer 316 and the User Datagram Protocol (UDP) layer315. A file system protocol layer provides multi-protocol file accessand, to that end, includes support for the Direct Access File System(DAFS) protocol 318, the NFS protocol 320, the CIFS protocol 322 and theHypertext Transfer Protocol (HTTP) protocol 324. A VI layer 326implements the VI architecture to provide direct access transport (DAT)capabilities, such as RDMA, as required by the DAFS protocol 318. AniSCSI driver layer 328 provides block protocol access over the TCP/IPnetwork protocol layers, while a FC driver layer 330 receives andtransmits block access requests and responses to and from the node. TheFC and iSCSI drivers provide FC-specific and iSCSI-specific accesscontrol to the blocks and, thus, manage exports of luns to either iSCSIor FCP or, alternatively, to both iSCSI and FCP when accessing theblocks on the node 200.

In addition, the storage operating system includes a series of softwarelayers organized to form a storage server 365 that provides data pathsfor accessing information stored on the disks 130 of the node 200. Tothat end, the storage server 365 includes a file system module 360 incooperating relation with a volume striping module (VSM) 370, a RAIDsystem module 380 and a disk driver system module 390. The RAID system380 manages the storage and retrieval of information to and from thevolumes/disks in accordance with I/O operations, while the disk driversystem 390 implements a disk access protocol such as, e.g., the SCSIprotocol. The VSM 370 illustratively implements a striped volume set(SVS) that may be advantageously used with the present invention. Asdescribed further herein, the VSM cooperates with the file system 360 toenable storage server 365 to service a volume of the SVS. In particular,the VSM 370 implements a novel Locate( ) function 375 to compute thelocation of data container content in the SVS volume to thereby ensureconsistency of such content served by the cluster.

The file system 360 implements a virtualization system of the storageoperating system 300 through the interaction with one or morevirtualization modules illustratively embodied as, e.g., a virtual disk(vdisk) module (not shown) and a SCSI target module 335. The vdiskmodule enables access by administrative interfaces, such as a userinterface of a management framework 1110 (see FIG. 11), in response to auser (system administrator) issuing commands to the node 200. The SCSItarget module 335 is generally disposed between the FC and iSCSI drivers328, 330 and the file system 360 to provide a translation layer of thevirtualization system between the block (lun) space and the file systemspace, where luns are represented as blocks.

The file system 360 is illustratively a message-based system thatallocates storage space for itself in the disk array 120 and controlsthe layout of information on the array. The file system further provideslogical volume management capabilities for use in access to theinformation stored on the storage devices, such as disks. That is, inaddition to providing file system semantics, the file system 360provides functions normally associated with a volume manager. Thesefunctions include (i) aggregation of the disks, (ii) aggregation ofstorage bandwidth of the disks, and (iii) reliability guarantees, suchas mirroring and/or parity (RAID). The file system 360 illustrativelyimplements the WAFL file system (hereinafter generally the“write-anywhere file system”) having an on-disk format representationthat is block-based using, e.g., 4 kilobyte (kB) blocks and using indexnodes (“inodes”) to identify files and file attributes (such as creationtime, access permissions, size and block location). The file system usesfiles to store metadata describing the layout of its file system; thesemetadata files include, among others, an inode file. A file (datacontainer) handle, i.e., an identifier that includes an inode number, isused to retrieve an inode from disk.

Broadly stated, all inodes of the write-anywhere file system areorganized into the inode file. A file system (fs) info block specifiesthe layout of information in the file system and includes an inode of adata container, e.g., file, that includes all other inodes of the filesystem. Each logical volume (file system) has an fsinfo block that ispreferably stored at a fixed location within, e.g., a RAID group. Theinode of the inode file may directly reference (point to) data blocks ofthe inode file or may reference indirect blocks of the inode file that,in turn, reference data blocks of the inode file. Within each data blockof the inode file are embedded inodes, each of which may referenceindirect blocks that, in turn, reference data blocks of a file.

Operationally, a request from the client 180 is forwarded as a packetover the computer network 140 and onto the node 200 where it is receivedat the network adapter 225. A network driver (of layer 312 or layer 330)processes the packet and, if appropriate, passes it on to a networkprotocol and file access layer for additional processing prior toforwarding to the write-anywhere file system 360. Here, the file systemgenerates operations to load (retrieve) the requested data from disk 130if it is not resident “in core”, i.e., in memory 224. If the informationis not in memory, the file system 360 indexes into the inode file usingthe inode number to access an appropriate entry and retrieve a logicalvbn. The file system then passes a message structure including thelogical vbn to the RAID system 380; the logical vbn is mapped to a diskidentifier and disk block number (disk,dbn) and sent to an appropriatedriver (e.g., SCSI) of the disk driver system 390. The disk driveraccesses the dbn from the specified disk 130 and loads the requesteddata block(s) in memory for processing by the node. Upon completion ofthe request, the node (and operating system) returns a reply to theclient 180 over the network 140.

It should be noted that the software “path” through the storageoperating system layers described above needed to perform data storageaccess for the client request received at the node may alternatively beimplemented in hardware. That is, in an alternate embodiment of theinvention, a storage access request data path may be implemented aslogic circuitry embodied within a field programmable gate array (FPGA)or an application specific integrated circuit (ASIC). This type ofhardware implementation increases the performance of the storage serviceprovided by node 200 in response to a request issued by client 180.Moreover, in another alternate embodiment of the invention, theprocessing elements of adapters 225, 228 may be configured to offloadsome or all of the packet processing and storage access operations,respectively, from processor 222, to thereby increase the performance ofthe storage service provided by the node. It is expressly contemplatedthat the various processes, architectures and procedures describedherein can be implemented in hardware, firmware or software.

As used herein, the term “storage operating system” generally refers tothe computer-executable code operable on a computer to perform a storagefunction that manages data access and may, in the case of a node 200,implement data access semantics of a general purpose operating system.The storage operating system can also be implemented as a microkernel,an application program operating over a general-purpose operatingsystem, such as UNIX® or Windows NT®, or as a general-purpose operatingsystem with configurable functionality, which is configured for storageapplications as described herein.

In addition, it will be understood to those skilled in the art that theinvention described herein may apply to any type of special-purpose(e.g., file server, filer or storage serving appliance) orgeneral-purpose computer, including a standalone computer or portionthereof, embodied as or including a storage system. Moreover, theteachings of this invention can be adapted to a variety of storagesystem architectures including, but not limited to, a network-attachedstorage environment, a storage area network and disk assemblydirectly-attached to a client or host computer. The term “storagesystem” should therefore be taken broadly to include such arrangementsin addition to any subsystems configured to perform a storage functionand associated with other equipment or systems. It should be noted thatwhile this description is written in terms of a write any where filesystem, the teachings of the present invention may be utilized with anysuitable file system, including a write in place file system.

D. CF Protocol

In the illustrative embodiment, the storage server 365 is embodied asD-blade 350 of the storage operating system 300 to service one or morevolumes of array 120. In addition, the multi-protocol engine 325 isembodied as N-blade 310 to (i) perform protocol termination with respectto a client issuing incoming data access request packets over thenetwork 140, as well as (ii) redirect those data access requests to anystorage server 365 of the cluster 100. Moreover, the N-blade 310 andD-blade 350 cooperate to provide a highly-scalable, distributed storagesystem architecture of the cluster 100. To that end, each blade includesa cluster fabric (CF) interface module 340 a,b adapted to implementintra-cluster communication among the blades, includingD-blade-to-D-blade communication for data container striping operationsdescribed herein.

The protocol layers, e.g., the NFS/CIFS layers and the iSCSI/FC layers,of the N-blade 310 function as protocol servers that translatefile-based and block-based data access requests from clients into CFprotocol messages used for communication with the D-blade 350. That is,the N-blade servers convert the incoming data access requests into filesystem primitive operations (commands) that are embedded within CFmessages by the CF interface module 340 for transmission to the D-blades350 of the cluster 100. Notably, the CF interface modules 340 cooperateto provide a single file system image across all D-blades 350 in thecluster 100. Thus, any network port of an N-blade that receives a clientrequest can access any data container within the single file systemimage located on any D-blade 350 of the cluster.

Further to the illustrative embodiment, the N-blade 310 and D-blade 350are implemented as separately-scheduled processes of storage operatingsystem 300; however, in an alternate embodiment, the blades may beimplemented as pieces of code within a single operating system process.Communication between an N-blade and D-blade is thus illustrativelyeffected through the use of message passing between the blades although,in the case of remote communication between an N-blade and D-blade ofdifferent nodes, such message passing occurs over the cluster switchingfabric 150. A known message-passing mechanism provided by the storageoperating system to transfer information between blades (processes) isthe Inter Process Communication (IPC) mechanism. The protocol used withthe IPC mechanism is illustratively a generic file and/or blockbased“agnostic” CF protocol that comprises a collection of methods/functionsconstituting a CF application programming interface (API). Examples ofsuch an agnostic protocol are the SpinFS and SpinNP protocols availablefrom Network Appliance, Inc. The SpinFS protocol is described in theabove-referenced U.S. Pat. No. 6,671,773.

The CF interface module 340 implements the CF protocol for communicatingfile system commands among the blades of cluster 100. Communication isillustratively effected by the D-blade exposing the CF API to which anN-blade (or another D-blade) issues calls. To that end, the CF interfacemodule 340 is organized as a CF encoder and CF decoder. The CF encoderof, e.g., CF interface 340 a on N-blade 310 encapsulates a CF message as(i) a local procedure call (LPC) when communicating a file systemcommand to a D-blade 350 residing on the same node 200 or (ii) a remoteprocedure call (RPC) when communicating the command to a D-bladeresiding on a remote node of the cluster 100. In either case, the CFdecoder of CF interface 340 b on D-blade 350 de-encapsulates the CFmessage and processes the file system command.

FIG. 4 is a schematic block diagram illustrating the format of a CFmessage 400 in accordance with an embodiment of with the presentinvention. The CF message 400 is illustratively used for RPCcommunication over the switching fabric 150 between remote blades of thecluster 100; however, it should be understood that the term “CF message”may be used generally to refer to LPC and RPC communication betweenblades of the cluster. The CF message 400 includes a media access layer402, an IP layer 404, a UDP layer 406, a reliable connection (RC) layer408 and a CF protocol layer 410. As noted, the CF protocol is a genericfile system protocol that conveys file system commands related tooperations contained within client requests to access data containersstored on the cluster 100; the CF protocol layer 410 is that portion ofmessage 400 that carries the file system commands. Illustratively, theCF protocol is datagram based and, as such, involves transmission ofmessages or “envelopes” in a reliable manner from a source (e.g., anN-blade 310) to a destination (e.g., a D-blade 350). The RC layer 408implements a reliable transport protocol that is adapted to process suchenvelopes in accordance with a connectionless protocol, such as UDP 406.

A data container, e.g., a file, is accessed in the file system using adata container handle. FIG. 5 is a schematic block diagram illustratingthe format of a data container handle 500 including a SVS ID field 502,an inode number field 504, a unique-ifier field 506 a striped flag field508 and a striping epoch number field 510. The SVS ID field 502 containsa global identifier (within the cluster 100) of the SVS within which thedata container resides. The inode number field 504 contains an inodenumber of an inode (within an inode file) pertaining to the datacontainer. The unique-ifier field 506 contains a monotonicallyincreasing number that uniquely identifies the data container handle500. The unique-ifier is particularly useful in the case where an inodenumber has been deleted, reused and reassigned to a new data container.The unique-ifier distinguishes that reused inode number in a particulardata container from a potentially previous use of those fields. Thestriped flag field 508 is illustratively a Boolean value that identifieswhether the data container is striped or not. The striping epoch numberfield 510 indicates the appropriate striping technique for use with thisdata container for embodiments where the SVS utilizes differing stripingtechniques for different data containers.

E. File System Organization

In the illustrative embodiment, a data container is represented in thewrite-anywhere file system as an inode data structure adapted forstorage on the disks 130. FIG. 6 is a schematic block diagram of aninode 600, which preferably includes a metadata section 605 and a datasection 660. The information stored in the metadata section 605 of eachinode 600 describes the data container (e.g., a file) and, as such,includes the type (e.g., regular, directory, vdisk) 610 of file, itssize 615, time stamps (e.g., access and/or modification time) 620 andownership, i.e., user identifier (UID 625) and group ID (GID 630), ofthe file. The metadata section 605 also includes a generation number640, and a meta data invalidation flag field 650. As described furtherherein, metadata invalidation flag field 650 is used to indicate whethermetadata in this inode is usable or whether it should be re-acquiredfrom the MDV. The contents of the data section 660 of each inode may beinterpreted differently depending upon the type of file (inode) definedwithin the type field 610. For example, the data section 660 of adirectory inode contains metadata controlled by the file system, whereasthe data section of a regular inode contains file system data. In thislatter case, the data section 660 includes a representation of the dataassociated with the file.

Specifically, the data section 660 of a regular on-disk inode mayinclude file system data or pointers, the latter referencing 4 kB datablocks on disk used to store the file system data. Each pointer ispreferably a logical vbn to facilitate efficiency among the file systemand the RAID system 380 when accessing the data on disks. Given therestricted size (e.g., 128 bytes) of the inode, file system data havinga size that is less than or equal to 64 bytes is represented, in itsentirety, within the data section of that inode. However, if the lengthof the contents of the data container exceeds 64 bytes but less than orequal to 64 kB, then the data section of the inode (e.g., a first levelinode) comprises up to 16 pointers, each of which references a 4 kBblock of data on the disk.

Moreover, if the size of the data is greater than 64 kB but less than orequal to 64 megabytes (MB), then each pointer in the data section 660 ofthe inode (e.g., a second level inode) references an indirect block(e.g., a first level L1 block) that contains 1024 pointers, each ofwhich references a 4 kB data block on disk. For file system data havinga size greater than 64 MB, each pointer in the data section 660 of theinode (e.g., a third level L3 inode) references a double-indirect block(e.g., a second level L2 block) that contains 1024 pointers, eachreferencing an indirect (e.g., a first level L1) block. The indirectblock, in turn, that contains 1024 pointers, each of which references a4 kB data block on disk. When accessing a file, each block of the filemay be loaded from disk 130 into the memory 224.

When an on-disk inode (or block) is loaded from disk 130 into memory224, its corresponding in-core structure embeds the on-disk structure.For example, the dotted line surrounding the inode 600 indicates thein-core representation of the on-disk inode structure. The in-corestructure is a block of memory that stores the on-disk structure plusadditional information needed to manage data in the memory (but not ondisk). The additional information may include, e.g., a “dirty” bit 670.After data in the inode (or block) is updated/modified as instructed by,e.g., a write operation, the modified data is marked “dirty” using thedirty bit 670 so that the inode (block) can be subsequently “flushed”(stored) to disk. The in-core and on-disk format structures of the WAFLfile system, including the inodes and inode file, are disclosed anddescribed in the previously incorporated U.S. Pat. No. 5,819,292 titledMETHOD FOR MAINTAINING CONSISTENT STATES OF A FILE SYSTEM AND FORCREATING USER-ACCESSIBLE READ-ONLY COPIES OF A FILE SYSTEM by David Hitzet al., issued on Oct. 6, 1998.

FIG. 7 is a schematic block diagram of an embodiment of a buffer tree ofa file that may be advantageously used with the present invention. Thebuffer tree is an internal representation of blocks for a file (e.g.,file 700) loaded into the memory 224 and maintained by thewrite-anywhere file system 360. A root (top-level) inode 702, such as anembedded inode, references indirect (e.g., level 1) blocks 704. Notethat there may be additional levels of indirect blocks (e.g., level 2,level 3) depending upon the size of the file. The indirect blocks (andinode) contain pointers 705 that ultimately reference data blocks 706used to store the actual data of the file. That is, the data of file 700are contained in data blocks and the locations of these blocks arestored in the indirect blocks of the file. Each level 1 indirect block704 may contain pointers to as many as 1024 data blocks. According tothe “write anywhere” nature of the file system, these blocks may belocated anywhere on the disks 130.

A file system layout is provided that apportions an underlying physicalvolume into one or more virtual volumes (or flexible volume) of astorage system, such as node 200. An example of such a file systemlayout is described in U.S. Pat. No. 7,409,494 titled EXTENSION OF WRITEANYWHERE FILE SYSTEM LAYOUT, by John K. Edwards et al. and assigned toNetwork Appliance, Inc. The underlying physical volume is an aggregatecomprising one or more groups of disks, such as RAID groups, of thenode. The aggregate has its own physical volume block number (pvbn)space and maintains metadata, such as block allocation structures,within that pvbn space. Each flexible volume has its own virtual volumeblock number (vvbn) space and maintains metadata, such as blockallocation structures, within that vvbn space. Each flexible volume is afile system that is associated with a container file; the container fileis a file in the aggregate that contains all blocks used by the flexiblevolume. Moreover, each flexible volume comprises data blocks andindirect blocks that contain block pointers that point at either otherindirect blocks or data blocks.

In one embodiment, pvbns are used as block pointers within buffer treesof files (such as file 700) stored in a flexible volume. This “hybrid”flexible volume embodiment involves the insertion of only the pvbn inthe parent indirect block (e.g., inode or indirect block). On a readpath of a logical volume, a “logical” volume (vol) info block has one ormore pointers that reference one or more fsinfo blocks, each of which,in turn, points to an inode file and its corresponding inode buffertree. The read path on a flexible volume is generally the same,following pvbns (instead of vvbns) to find appropriate locations ofblocks; in this context, the read path (and corresponding readperformance) of a flexible volume is substantially similar to that of aphysical volume. Translation from pvbn-to-disk,dbn occurs at the filesystem/RAID system boundary of the storage operating system 300.

In an illustrative dual vbn hybrid embodiment, both a pvbn and itscorresponding vvbn are inserted in the parent indirect blocks in thebuffer tree of a file. That is, the pvbn and vvbn are stored as a pairfor each block pointer in most buffer tree structures that have pointersto other blocks, e.g., level 1(L1) indirect blocks, inode file level 0(L0) blocks. FIG. 8 is a schematic block diagram of an illustrativeembodiment of a buffer tree of a file 800 that may be advantageouslyused with the present invention. A root (top-level) inode 802, such asan embedded inode, references indirect (e.g., level 1) blocks 804. Notethat there may be additional levels of indirect blocks (e.g., level 2,level 3) depending upon the size of the file. The indirect blocks (andinode) contain pvbn/vvbn pointer pair structures 808 that ultimatelyreference data blocks 806 used to store the actual data of the file.

The pvbns reference locations on disks of the aggregate, whereas thevvbns reference locations within files of the flexible volume. The useof pvbns as block pointers 808 in the indirect blocks 804 providesefficiencies in the read paths, while the use of vvbn block pointersprovides efficient access to required metadata. That is, when freeing ablock of a file, the parent indirect block in the file contains readilyavailable vvbn block pointers, which avoids the latency associated withaccessing an owner map to perform pvbn-to-vvbn translations; yet, on theread path, the pvbn is available.

FIG. 9 is a schematic block diagram of an embodiment of an aggregate 900that may be advantageously used with the present invention. Luns(blocks) 902, directories 904, qtrees 906 and files 908 may be containedwithin flexible volumes 910, such as dual vbn flexible volumes, that, inturn, are contained within the aggregate 900. The aggregate 900 isillustratively layered on top of the RAID system, which is representedby at least one RAID plex 950 (depending upon whether the storageconfiguration is mirrored), wherein each plex 950 comprises at least oneRAID group 960. Each RAID group further comprises a plurality of disks930, e.g., one or more data (D) disks and at least one (P) parity disk.

Whereas the aggregate 900 is analogous to a physical volume of aconventional storage system, a flexible volume is analogous to a filewithin that physical volume. That is, the aggregate 900 may include oneor more files, wherein each file contains a flexible volume 910 andwherein the sum of the storage space consumed by the flexible volumes isphysically smaller than (or equal to) the size of the overall physicalvolume. The aggregate utilizes a physical pvbn space that defines astorage space of blocks provided by the disks of the physical volume,while each embedded flexible volume (within a file) utilizes a logicalvvbn space to organize those blocks, e.g., as files. Each vvbn space isan independent set of numbers that corresponds to locations within thefile, which locations are then translated to dbns on disks. Since theflexible volume 910 is also a logical volume, it has its own blockallocation structures (e.g., active, space and summary maps) in its vvbnspace.

A container file is a file in the aggregate that contains all blocksused by a flexible volume. The container file is an internal (to theaggregate) feature that supports a flexible volume; illustratively,there is one container file per flexible volume. Similar to a purelogical volume in a file approach, the container file is a hidden file(not accessible to a user) in the aggregate that holds every block inuse by the flexible volume. The aggregate includes an illustrativehidden metadata root directory that contains subdirectories of flexiblevolumes:

WAFL/fsid/filesystem File, Storage Label File

Specifically, a physical file system (WAFL) directory includes asubdirectory for each flexible volume in the aggregate, with the name ofsubdirectory being a file system identifier (fsid) of the flexiblevolume. Each fsid subdirectory (flexible volume) contains at least twofiles, a filesystem file and a storage label file. The storage labelfile is illustratively a 4 kB file that contains metadata similar tothat stored in a conventional raid label. In other words, the storagelabel file is the analog of a raid label and, as such, containsinformation about the state of the flexible volume such as, e.g., thename of the flexible volume, a universal unique identifier (uuid) andfsid of the flexible volume, whether it is online, being created orbeing destroyed, etc.

FIG. 10 is a schematic block diagram of an on-disk representation of anaggregate 1000. The storage operating system 300, e.g., the RAID system380, assembles a physical volume of pvbns to create the aggregate 1000,with pvbns 1 and 2 comprising a “physical” volinfo block 1002 for theaggregate. The volinfo block 1002 contains block pointers to fsinfoblocks 1004, each of which may represent a snapshot of the aggregate.Each fsinfo block 1004 includes a block pointer to an inode file 1006that contains inodes of a plurality of files, including an owner map1010, an active map 1012, a summary map 1014 and a space map 1016, aswell as other special metadata files. The inode file 1006 furtherincludes a root directory 1020 and a “hidden” metadata root directory1030, the latter of which includes a namespace having files related to aflexible volume in which users cannot “see” the files. The hiddenmetadata root directory includes the WAFL/fsid/directory structure thatcontains filesystem file 1040 and storage label file 1090. Note thatroot directory 1020 in the aggregate is empty; all files related to theaggregate are organized within the hidden metadata root directory 1030.

In addition to being embodied as a container file having level 1 blocksorganized as a container map, the filesystem file 1040 includes blockpointers that reference various file systems embodied as flexiblevolumes 1050. The aggregate 1000 maintains these flexible volumes 1050at special reserved inode numbers. Each flexible volume 1050 also hasspecial reserved inode numbers within its flexible volume space that areused for, among other things, the block allocation bitmap structures. Asnoted, the block allocation bitmap structures, e.g., active map 1062,summary map 1064 and space map 1066, are located in each flexiblevolume.

Specifically, each flexible volume 1050 has the same inode filestructure/content as the aggregate, with the exception that there is noowner map and no WAFL/fsid/filesystem file, storage label file directorystructure in a hidden metadata root directory 1080. To that end, eachflexible volume 1050 has a volinfo block 1052 that points to one or morefsinfo blocks 1054, each of which may represent a snapshot, along withthe active file system of the flexible volume. Each fsinfo block, inturn, points to an inode file 1060 that, as noted, has the same inodestructure/content as the aggregate with the exceptions noted above. Eachflexible volume 1050 has its own inode file 1060 and distinct inodespace with corresponding inode numbers, as well as its own root (fsid)directory 1070 and subdirectories of files that can be exportedseparately from other flexible volumes.

The storage label file 1090 contained within the hidden metadata rootdirectory 1030 of the aggregate is a small file that functions as ananalog to a conventional raid label. A raid label includes physicalinformation about the storage system, such as the volume name; thatinformation is loaded into the storage label file 1090. Illustratively,the storage label file 1090 includes the name 1092 of the associatedflexible volume 1050, the online/offline status 1094 of the flexiblevolume, and other identity and state information 1096 of the associatedflexible volume (whether it is in the process of being created ordestroyed).

F. VLDB

FIG. 11 is a schematic block diagram illustrating a collection ofmanagement processes that execute as user mode applications 1100 on thestorage operating system 300 to provide management of configurationinformation (i.e. management data) for the nodes of the cluster. To thatend, the management processes include a management framework process1110 and a volume location database (VLDB) process 1130, each utilizinga data replication service (RDB 1150) linked as a library. Themanagement framework 1110 provides a user or an administrator 1170interface via a command line interface (CLI) and/or a web-basedgraphical user interface (GUI). The management framework isillustratively based on a conventional common interface model (CIM)object manager that provides the entity to which users/systemadministrators interact with a node 200 in order to manage the cluster100.

The VLDB 1130 is a database process that tracks the locations of variousstorage components (e.g., SVSs, flexible volumes, aggregates, etc.)within the cluster 100 to thereby facilitate routing of requeststhroughout the cluster. In the illustrative embodiment, the N-blade 310of each node accesses a configuration table 235 that maps the SVS ID 502of a data container handle 500 to a D-blade 350 that “owns” (services)the data container within the cluster. The VLDB includes a plurality ofentries which, in turn, provide the contents of entries in theconfiguration table 235; among other things, these VLDB entries keeptrack of the locations of the flexible volumes (hereinafter generally“volumes 910”) and aggregates 900 within the cluster. Examples of suchVLDB entries include a VLDB volume entry 1200 and a VLDB aggregate entry1300.

FIG. 12 is a schematic block diagram of an exemplary VLDB volume entry1200. The entry 1200 includes a volume ID field 1205, an aggregate IDfield 1210 and, in alternate embodiments, additional fields 1215. Thevolume ID field 1205 contains an ID that identifies a volume 910 used ina volume location process. The aggregate ID field 1210 identifies theaggregate 900 containing the volume identified by the volume ID field1205. Likewise, FIG. 13 is a schematic block diagram of an exemplaryVLDB aggregate entry 1300. The entry 1300 includes an aggregate ID field1305, a D-blade ID field 1310 and, in alternate embodiments, additionalfields 1315. The aggregate ID field 1305 contains an ID of a particularaggregate 900 in the cluster 100. The D-blade ID field 1310 contains anID of the D-blade hosting the particular aggregate identified by theaggregate ID field 1305.

The VLDB illustratively implements a RPC interface, e.g., a Sun RPCinterface, which allows the N-blade 310 to query the VLDB 1130. Whenencountering contents of a data container handle 500 that are not storedin its configuration table, the N-blade sends an RPC to the VLDBprocess. In response, the VLDB 1130 returns to the N-blade theappropriate mapping information, including an ID of the D-blade thatowns the data container. The N-blade caches the information in itsconfiguration table 235 and uses the D-blade ID to forward the incomingrequest to the appropriate data container. All functions andinteractions between the N-blade 310 and D-blade 350 are coordinated ona cluster-wide basis through the collection of management processes andthe RDB library user mode applications 1100.

To that end, the management processes have interfaces to (are closelycoupled to) RDB 1150. The RDB comprises a library that provides apersistent object store (storing of objects) for the management dataprocessed by the management processes. Notably, the RDB 1150 replicatesand synchronizes the management data object store access across allnodes 200 of the cluster 100 to thereby ensure that the RDB databaseimage is identical on all of the nodes 200. At system startup, each node200 records the status/state of its interfaces and IP addresses (thoseIP addresses it “owns”) into the RDB database.

G. Storage System Architecture

The present invention is related to a storage system architectureillustratively comprising of two or more volumes 910 distributed acrossa plurality of nodes 200 of cluster 100. The volumes are organized as aSVS and configured to store content of data containers, such as filesand luns, served by the cluster in response to multi-protocol dataaccess requests issued by clients 180. Notably, the content of each datacontainer is apportioned among the volumes of the SVS to thereby improvethe efficiency of storage service provided by the cluster. To facilitatea description and understanding of the present invention, datacontainers are hereinafter referred to generally as “files”.

The SVS is associated with a set of striping rules that define a stripealgorithm, a stripe width and an ordered list of volumes within the SVS.The striping rules for each SVS are illustratively stored as an entry ofVLDB 1130 and accessed by SVS ID. FIG. 14 is a schematic block diagramof an exemplary VLDB SVS entry 1400 in accordance with an embodiment ofthe present invention. The VLDB entry 1400 includes a SVS ID field 1405and one or more sets of striping rules 1430. In alternate embodimentsadditional fields 1435 may be included. The SVS ID field 1405 containsthe ID of a SVS which, in operation, is specified in data containerhandle 500.

Each set of striping rules 1430 illustratively includes a stripe widthfield 1410, a stripe algorithm ID field 1415, an ordered list of volumesfield 1420 and, in alternate embodiments, additional fields 1425. Thestriping rules 1430 contain information for identifying the organizationof a SVS. For example, the stripe algorithm ID field 1415 identifies astriping algorithm used with the SVS. In the illustrative embodiment,multiple striping algorithms could be used with a SVS; accordingly,stripe algorithm ID is needed to identify which particular algorithm isutilized. Each striping algorithm, in turn, specifies the manner inwhich file content is apportioned as stripes across the plurality ofvolumes of the SVS. The stripe width field 1410 specifies the size/widthof each stripe. The ordered list of volumes field 1420 contains the IDsof the volumes comprising the SVS. Moreover, the ordered list of volumesmay specify the function and implementation of the various volumes andstriping rules of the SVS. For example, the first volume in the orderedlist may denote the MDV of the SVS, whereas the ordering of volumes inthe list may denote the manner of implementing a particular stripingalgorithm, e.g., round-robin.

A Locate( ) function 375 is provided that enables the VSM 370 and othermodules (such as those of N-blade 310) to locate a D-blade 350 and itsassociated volume of a SVS in order to service an access request to afile. The Locate( ) function takes as arguments, at least (i) a SVS ID1405, (ii) an offset within the file, (iii) the inode number for thefile and (iv) a set of striping rules 1430, and returns the volume 910on which that offset begins within the SVS. For example, assume a dataaccess request directed to a file is issued by a client 180 and receivedat the N-blade 310 of a node 200, where it is parsed through themulti-protocol engine 325 to the appropriate protocol server of N-blade310. To determine the location of a D-blade 350 to which to transmit aCF message 400, the N-blade 310 may first retrieve a SVS entry 1400 toacquire the striping rules 1430 (and list of volumes 1420) associatedwith the SVS. The N-blade 310 then executes the Locate( ) function 375to identify the appropriate volume to which to direct an operation.Thereafter, the N-Blade may retrieve the appropriate VLDB volume entry1200 to identify the aggregate containing the volume and the appropriateVLDB aggregate entry 1300 to ultimately identify the appropriate D-blade350. The protocol server of N-blade 310 then transmits the CF message400 to the D-blade 350.

H. Data Placement Technique

The present invention is directed to a technique for placing content,such as data, of one or more data containers on volumes of a SVS. Asnoted, the SVS is associated with a set of striping rules that define astripe algorithm, a stripe width and an ordered list of volumesdistributed across the nodes 200 interconnected as cluster 100. Thestripe algorithm specifies the manner in which the data is apportionedas stripes across the volumes, while the stripe width specifies thesize/width of each stripe. Notably, the data placement technique selectsa volume within which to place a stripe such that all stripes areapportioned among the volumes of the SVS in a manner that improves theefficiency of storage service provided by the cluster.

In the illustrative embodiment, the inventive data placement techniqueis preferably implemented by the VSM 370 cooperating with the filesystem 360 of storage operating system 300 that, among other things,controls the layout of data on the SVS. The parameters involved with thedata placement technique include (i) a “chunk” or stripe width and (ii)the number of volumes of a SVS. Specifically, the data of each datacontainer is organized (divided) into stripes, wherein each stripe has apredetermined stripe width. Illustratively, the stripe width is 2 MB,although it should be noted that other stripe widths may be selected inaccordance with the present invention. Preferably, though, the selectedstripe width should be a multiple of the on-disk block size (e.g., 4 kB)and equal to a power of 2, the latter to enable efficient arithmeticcomputations.

According to a first aspect of the invention, the placement of dataacross the volumes of the SVS allows specification of (i.e., reflects) adeterministic pattern of fixed length. That is, the pattern determines aplacement of data of a data container, such as a file, that is stripedamong the volumes of the SVS. The placement pattern is such that thestripes are distributed exactly or nearly equally among the volumes andthat, within any local span of a small multiple of the number ofvolumes, the stripes are distributed nearly equally among the volumes.

FIG. 15A is a schematic diagram illustrating the placement of stripes ofdata of a data container across volumes of an exemplary SVS 1500according to the data placement technique of the present invention.Assume SVS 1500 initially comprises one volume 1502 configured to storeall data of the data container; therefore, each stripe on the volumestores data (D). When a second volume 1504 is added to expand the SVS,the stripes may be distributed between the two volumes. Likewise, when athird volume 1506 and, thereafter, a fourth volume 1508 are added to theexpanded SVS, the stripes may be distributed among those volumes.

Stripes of data (D) may be distributed among the volumes in accordancewith the inventive technique that reassigns one of N stripes from eachpre-existing volume to the added volume, wherein N is equal to thenumber of volumes in the expanded SVS. Overall, one of N stripes isreassigned to the added volume, with each pre-existing volume continuingto hold exactly 1/N of the stripes in the expanded SVS. For a 2-volumeSVS, every other stripe on the first volume 1502 is moved to the secondvolume 1504. When the third volume 1506 is added to the expanded SVS1500, thereby creating a 3-volume SVS, every third remaining stripe onthe first volume 1506, as well as every third stripe on the secondvolume 1504, is moved to the third volume 1506. When the fourth volume1508 is added to the SVS, creating a 4-volume SVS, every fourthremaining stripe from each volume (volumes 1502-1506) is moved to thefourth volume 1508.

According to a second aspect of the invention, the placement pattern issubstantially similar for a plurality of SVSs having different numbersof volumes. For example, assume one or more volumes are added toexisting volumes of a SVS and that stripes on the existing volumes areredistributed among the additional volumes. This aspect of the inventionenables re-striping of the data by moving a minimum number of stripes,while retaining a property of balance across the new number of volumesin the SVS. In general, adding an Nth volume to a SVS having N−1 volumesrequires moving 1/N of the existing stripes from each of thepre-existing N−1 volumes to the added Nth volume.

FIG. 15B is a schematic diagram illustrating reassignment of stripes ofdata of the data container across volumes of the exemplary SVS 1500according to the data placement technique of the present invention. As aresult of this reassignment, the amount of data (D) on each volume issubstantially the same. The location of the data stripe also changesacross the volumes of the SVS in a predictable and deterministicpattern. That is, given a stripe width and number of volumes in a SVS,the data placement technique determines the location of each stripe on avolume of the SVS. This aspect of the novel technique may be embodied asa data structure of stripe placements having a predetermined size (i.e.,number of entries).

Specifically, the data placement technique can be implemented by storingor generating a data structure (e.g., a table) in memory containing theplacement of stripes for a specific number of volumes in a SVS ofspecific size. It is also possible to store in a single table allpossible placements of stripes for any SVS size up to a certain limit.Here, for example, the table may store a bitmap for each SVS, where theone (or more) highest numbered bit set is selected that is less than N,wherein N is the number of volumes in the SVS. In general, anytable-based stripe placement that maintains balance of distributed datais contemplated by the present invention. The locations of data stripesfor the data placement technique are calculated for a known size of SVSvolumes or for a maximum volume size of the SVS; either way, as noted,the calculated stripe locations may be stored in a table. A dataplacement pattern defined by the stored locations and, in particular, arepeat interval of the pattern can be used to determine the location ofdata stripes on any volume in the SVS for a given size.

FIG. 16 is a diagram of a stripe placement table 1600 illustrating therepeat interval for various SVS sizes in accordance with the dataplacement technique. The stripe placement pattern repeats at arepetition interval dependent upon the size of the SVS. If a SVS size N(i.e., N volumes) repeats every K stripes then the SVS size (N+1) willrepeat in the smallest number that both K and (N+1) evenly divide.Notably, the content of the table does not repeat until it reaches anumber (repeat interval) dependent on the value of N, where N equals thenumber of volumes. For example, in a 2-volume SVS, the stripe placementpattern repeats every two stripes. When a third volume is added, thestripe pattern repeats every six stripes. When a fourth volume is added,the stripe pattern repeats every twelve stripes. It can be seen fromtable 1600 that for a SVS size of five (and six), the stripe patternrepeats every sixty stripes.

The repeat interval as a function of SVS size is determined inaccordance with the set of unique prime factors (“primes”) up to N,where N equals the number of volumes. The repeat interval (which isequivalent to the number of entries in table 1600) is less than Nfactorial and, in fact, is equal to the product of all primes less thanor equal to N, with each prime raised to the largest power possible suchthat the result is less than or equal to N. As some of the numbersbetween one and N are prime numbers, it is clear that the repeatinterval may get large, making the table large. For example, for N=10,the table size is 2^3×3^2×5^1×7^1=8×9×5×7=2520. Similarly, for N=32, thetable size is2^5×3^3×5^2×7^1×11^1×13^1×17^1×19^1×23^1×29^1×31^1=32×27×25×7×11×13×17×19×23×29×31≅144×10^12.

A tradeoff may then be made between the table size of the pattern andprecision of balancing; the table can be terminated at a reasonablepoint and the SVS size at that particular repeat interval can be used.Thereafter, even if there are more volumes than the SVS size, thetechnique can continue to repeat the pattern and still realize nearlyuniform balance of data across the SVS within, e.g., a half percent. Forexample, as noted above, a SVS size of ten volumes translates into astripe placement pattern that repeats every 2,520 stripes. A table ofthis size (i.e., 2,520 entries) is relatively compact in memory and canbe computed relatively quickly at start-up using appropriate softwarecode. In contrast, the table for a SVS of 32 volumes (i.e., 144×10^12entries) is too large to store in memory.

The 2,520 entry table works well with any reasonable number of volumesto provide good data balance; however, it should be noted that this sizetable is not the only choice and other sized tables may also be used.The 2,520 entry pattern is perfectly balanced for N volumes up to ten;for N greater than 10, the pattern provides good data balance eventhough the pattern has not repeated. In other words, although the stripeplacement table for a 17-volume SVS is rather large (7.7 MB with 5 bitsper pattern), if only a fraction of the table is used, good data balancecan still be achieved. Cutting off the pattern at 2,520, for example,yields perfect balance for all SVS sizes up to 10 volumes, and less than1% imbalance to larger SVSs while limiting the table size to 2520×4 bits1260 bytes for N=11 and 5×2520 bits=1,575 bytes for N=17 to 32.

The stripe placement table 1600 can be encoded as a single numberindicating a bit position of data stripes for a particular value of N.The table can also be encoded as a single table indicating (for all SVSsizes up to some limit, e.g., 32 volumes) what volumes possibly containstripes. The determination of which volume actually contains a stripefor a specific value of N is then made by masking off the high order32-N bits and selecting the highest order remaining one or two (or more)bits.

FIG. 17 is a flowchart detailing the steps of a procedure for accessingdata in response to a data access request directed to a data containerserved by the cluster 100 in accordance with the data placementtechnique of the present invention. The procedure starts in step 1705and continues to step 1710 where a data access request, e.g., a readrequest, is received at an N-blade 310 of a node 200 in cluster 100. Forexample, assume the read request is directed to a data container, suchas a file, at an offset of 3 MB-4 MB. In Step 1715, the N-blade parsesthe data container handle 500 associated with the read request to obtainthe SVS ID 502 and inode number 504 of the file. As noted, the SVS ID502 is a global identifier (within the cluster 100) of the SVS withinwhich the file resides and the inode number 504 is the number of aninode (within an inode file) pertaining to the file.

To determine the location of a D-blade 350 to which to transmit a CFmessage 400, the N-blade 310 uses the SVS ID 502 to retrieve anappropriate SVS entry 1400 of VLDB 1130 in Step 1720. The SVS entry 1400defines the striping rules 1430, including the stripe width 1410, stripealgorithm ID 1415 and ordered list of volumes 1420, associated with theSVS. As noted, the stripe width 1410 specifies the width of each stripe(e.g., 2 MB) and the ordered list of volumes 1420 specifies the numberof volumes in the SVS. Moreover, the stripe algorithm ID 1415 identifiesa striping algorithm used with the SVS. In the illustrative embodiment,the stripe algorithm is an algorithm associated with the data placementtechnique and, as such, is assigned a unique stripe algorithm ID.

In Step 1725, the N-blade utilizes the Locate( ) function 375 toidentify the D-blade to which to re-direct the request. As furthernoted, the Locate( ) function takes as arguments, among others, the setof striping rules 1430, inode number 504 and the offset into the fileand, according to the invention, returns the identity (ID) of theappropriate volume that serves the stripe associated with file offset.To that end, the N-blade computes a stripe number by dividing the fileoffset of the request by the stripe width, and then determines thelocation of the stripe affected by the read request by indexing into thestripe placement table 1600 using the computed stripe number, e.g., thestripe number modulo the table size. In step 1730, the N-blade forwardsthe request to the appropriate D-blade 350, where the file system 360and VSM 370 process the request in Step 1735. An example of a techniquefor processing a data access request directed to a SVS is described inthe above-referenced U.S. patent application entitled STORAGE SYSTEMARCHITECTURE FOR STRIPING DATA CONTAINER CONTENT ACROSS VOLUMES OF ACLUSTER. The procedure then ends in step 1740.

Advantageously, the data placement technique minimizes the number ofstripes that have to move for any change in the number of volumes of theSVS, while retaining a property that the data is balanced or nearlybalanced across those volumes. The novel technique also minimizes thecost of a re-striping operation, while potentially substantiallyreducing the duration of such an operation. Moreover, the novel dataplacement technique maintains data balance after re-striping.

The foregoing description has been directed to specific embodiments ofthis invention. It will be apparent, however, that other variations andmodifications may be made to the described embodiments, with theattainment of some or all of their advantages. For instance, it isexpressly contemplated that the teachings of this invention can beimplemented as software, including a computer-readable medium havingprogram instructions executing on a computer, hardware, firmware, or acombination thereof. Accordingly this description is to be taken only byway of example and not to otherwise limit the scope of the invention.Therefore, it is the object of the appended claims to cover all suchvariations and modifications as come within the true spirit and scope ofthe invention.

1. A method, comprising: coupling two or more computers together to forma cluster; organizing a plurality of volumes as a striped volume set,wherein the plurality of volumes are distributed across the cluster andeach volume is a logical arrangement of one or more storage devicescoupled to a computer of the two or more computers; associating thestriped volume set with a set of striping rules that define a stripealgorithm, a stripe width and a list of volumes; apportioning datacontainer content as stripes, each stripe having a size specified by thestripe width; placing the stripes across the volumes in a mannerspecified by the stripe algorithm that reflects a deterministic patternof fixed length such that the stripes are distributed substantiallyequal among the volumes; adding an additional volume to the stripedvolume set; and moving only 1/N of the stripes to the additional volume,wherein N equals a number of volumes in the striped volume set.
 2. Themethod of claim 1, wherein the deterministic pattern of fixed length isembodied by a stripe placement table.
 3. The method of claim 2, whereinthe stripe placement table comprises data identifying a placement ofstripes for a predefined number of volumes in the striped volume set. 4.The method of claim 2, wherein the stripe placement table comprises dataidentifying a placement of stripes for a plurality of predefined numberof volumes in the striped volume set.
 5. The method of claim 1, whereinthe deterministic pattern of fixed length repeats at a repetitioninterval.
 6. The method of claim 5, wherein the repetition interval isdetermined in accordance with a set of prime factors less than N,wherein N is a number of volumes comprising the striped volume set. 7.The method of claim 1, wherein the data containers comprise files. 8.The method of claim 1, wherein the data containers comprise logical unitnumbers.
 9. A system, comprising; a plurality of computers coupledtogether to form a storage system cluster; each computer of theplurality of computers configured to store one or more volumes of aplurality of volumes that create a striped volume set, wherein eachvolume is a logical arrangement of one or more storage devices coupledto a computer of the plurality of computers; a storage operating systemconfigured to control layout of data container content on the volumes ofthe striped volume set volumes, the storage operating system furtherconfigured to apportion the data container content as stripes and placethe stripes across the volumes in a manner that reflects a deterministicpattern of fixed length such that the stripes are distributedsubstantially equal among the volumes; a new volume added to the stripedvolume set; and the storage operating system further configured to moveonly 1/N of the stripes to the new volume, wherein N equals a number ofvolumes in the striped volume set.
 10. The system of claim 9, whereinthe deterministic pattern of fixed length is embodied by a stripeplacement table.
 11. The system of claim 10, wherein the stripeplacement table comprises data identifying a placement of stripes for apredefined number of volumes in the striped volume set.
 12. The systemof claim 10 wherein the stripe placement table comprises dataidentifying a placement of stripes for a plurality of predefined numberof volumes in the striped volume set.
 13. The system of claim 9, whereinthe deterministic pattern of fixed length repeats at a repetitioninterval.
 14. The system of claim 13, wherein the repetition interval isdetermined in accordance with a set of prime factors less than N,wherein N is a number of volumes comprising the striped volume set. 15.The system of claim 9, wherein the data containers comprise files. 16.The system of claim 9, wherein the data container comprise logical unitnumbers.
 17. A method, comprising: coupling two or more computerstogether to form a cluster; organizing a plurality of volumes as astriped volume set, wherein the plurality of volumes are distributedacross the cluster and each volume is a logical arrangement of one ormore storage devices coupled to a computer of the two or more computers;associating the striped volume set with a set of striping rules thatdefine a stripe algorithm, a stripe width and a list of volumes;apportioning data container content as stripes, each stripe having asize specified by the stripe width; placing the stripes across thevolumes in a manner specified by the stripe algorithm that reflects adeterministic pattern of fixed length such that the stripes aredistributed substantially equal among the volumes; adding a new volumeto the striped volume set, wherein N is equal to a number of volumes inthe striped volume set after the volume is added; and moving 1/N stripesof data to the new volume.
 18. The method of claim 17, wherein the datacontainer is a logical unit number or a file.